<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:77:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\news\index.html";i:1491635081;s:80:"D:\wwwroot\fangcms_city_add\public/../application/mobile\view\public\layout.html";i:1493803137;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title><?php echo $seo['title']; ?></title>
    <meta name="Keywords" content="<?php echo $seo['keys']; ?>">
    <meta name="Description" content="<?php echo $seo['desc']; ?>">
    <link rel="stylesheet" href="__CSS__/amazeui.min.css"/>
    <link type="text/css" rel="stylesheet"  href="__CSS__/main.css"/>
    <link rel="stylesheet" href="__CSS__/mobile.css">
    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script>
        var page = 1,flag  = true,params =  {page: page};
    </script>
</head>
<body>

<header data-am-widget="header" class="am-header am-header-default">
    <div class="am-header-left am-header-nav">
        <a href="javascript:history.back();" class="">
            <i class="am-header-icon am-icon-chevron-left"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        <?php if(isset($info)): ?><?php echo $info['title']; else: ?><?php echo $title; endif; ?>
    </h1>
    <div class="am-header-right am-header-nav">
        <a href="<?php echo url('Index/index'); ?>" class="">
            <i class="am-header-icon am-icon-home"></i>
        </a>
    </div>
</header>


<script src="__JS__/amazeui.min.js"></script>
<div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{"directionNav":false}' >
    <ul class="am-slides">
        <?php if(is_array($slides) || $slides instanceof \think\Collection || $slides instanceof \think\Paginator): $i = 0; $__LIST__ = $slides;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <li><?php echo $vo; ?></li>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
</div>

<div class="div_box">
    <h1 class="h1_title"><span class="h1_title_t"><?php echo $articleCate['cate'][1]['name']; ?></span></h1>
    <div class="">
       <ul>
            <?php $obj = model("article");$obj->where("status=1 and cate_id=1");$obj->field("id,cate_id,title,description");$obj->order("ordid asc,id desc");$name = $obj->limit(7)->select();if(is_array( $name ) || $name  instanceof \think\Paginator): $i = 0; $__LIST__ = $name;if( count($__LIST__)==0 ) : echo "暂无数据" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($i > 3): ?>
            <li><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo $vo['title']; ?></a></li>
            <?php else: ?>
            <li>
                <span class="title_t"><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo $vo['title']; ?></a></span>
                <p><?php echo msubstr($vo['description'],0,68); ?><<a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>" class="org">查看详细</a>></p>
            </li>
            <?php endif; endforeach; endif; else: echo "暂无数据" ;endif; ?>
        </ul>
    </div>
</div>

<div class="div_box01">
    <div class="tab_title01 overflow_h">
        <ul class="idTabs">
            <li><a href="#tab01" class="selected"><?php echo $articleCate['cate'][2]['name']; ?></a></li>
            <li><a href="#tab02"><?php echo $articleCate['cate'][3]['name']; ?></a></li>
            <li><a href="#tab03"><?php echo $articleCate['cate'][4]['name']; ?></a></li>
            <li><a href="#tab04"><?php echo $articleCate['cate'][9]['name']; ?></a></li>
        </ul>
    </div>
    <div id="con">
    <div class="news_list" id="tab01">
        <ul>
            <?php if(is_array($news_baodao) || $news_baodao instanceof \think\Collection || $news_baodao instanceof \think\Paginator): $i = 0; $__LIST__ = $news_baodao;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <li>
                    <span class="title_t"><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo $vo['title']; ?></a></span>
                    <p><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo msubstr($vo['description'],0,58); ?></a></p></li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <div class="plastic_bottom_pages">
            <a href="<?php echo url('News/lists',['cate_id'=>'2']); ?>">查看更多<?php echo $articleCate['cate'][2]['name']; ?>&gt;&gt;</a>
        </div>
    </div>

    <div class="news_list" id="tab02" style="display:none">
        <ul>
            <?php if(is_array($news_bendi) || $news_bendi instanceof \think\Collection || $news_bendi instanceof \think\Paginator): $i = 0; $__LIST__ = $news_bendi;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
            <li>
                <span class="title_t"><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo $vo['title']; ?></a></span>
                <p><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo msubstr($vo['description'],0,58); ?></a></p></li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <div class="plastic_bottom_pages">
            <a href="<?php echo url('News/lists',['cate_id'=>'3']); ?>">查看更多<?php echo $articleCate['cate'][3]['name']; ?>&gt;&gt;</a>
        </div>
    </div>

    <div class="news_list" id="tab03" style="display:none">
        <ul>
            <?php if(is_array($news_loupan) || $news_loupan instanceof \think\Collection || $news_loupan instanceof \think\Paginator): $i = 0; $__LIST__ = $news_loupan;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
            <li>
                <span class="title_t"><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo $vo['title']; ?></a></span>
                <p><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo msubstr($vo['description'],0,58); ?></a></p></li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <div class="plastic_bottom_pages">
            <a href="<?php echo url('News/lists',['cate_id'=>'4']); ?>">查看更多<?php echo $articleCate['cate'][4]['name']; ?>&gt;&gt;</a>
        </div>
    </div>

    <div class="news_list" id="tab04" style="display:none">
        <ul>
            <?php if(is_array($news_goufang) || $news_goufang instanceof \think\Collection || $news_goufang instanceof \think\Paginator): $i = 0; $__LIST__ = $news_goufang;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
            <li>
                <span class="title_t"><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo $vo['title']; ?></a></span>
                <p><a href="<?php echo url('News/detail',['id'=>$vo['id']]); ?>"><?php echo msubstr($vo['description'],0,58); ?></a></p></li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <div class="plastic_bottom_pages">
            <a href="<?php echo url('News/lists',['cate_id'=>'9']); ?>">查看更多<?php echo $articleCate['cate'][9]['name']; ?>&gt;&gt;</a>
        </div>
    </div>
    </div>
</div>
<script>
    $(function(){
        $('.idTabs a').on('click',function(){
           var index = $(this).parent().index();
            $(this).addClass('selected').parent().siblings().find('a').removeClass('selected');
            $('#con').children().eq(index).show().siblings().hide();
        });
    })
</script>

<footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }">
    <div class="am-footer-switch"><?php $n=0; if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): $i = 0; $__LIST__ = $menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['pos'] == 2): $n++; if(!(empty($vo['alias']) || (($vo['alias'] instanceof \think\Collection || $vo['alias'] instanceof \think\Paginator ) && $vo['alias']->isEmpty()))): $url=url($vo['model'].'/detail',['cate'=>$vo['alias']]); else: $url=url($vo['model'].'/index'); endif; if($n > 1): ?><span class="am-footer-divider"> | </span><?php endif; ?><a class="am-footer-desktop" href="<?php echo $url; ?>"><?php echo $vo['title']; ?></a>
        <?php endif; endforeach; endif; else: echo "" ;endif; ?>

    </div>
    <div class="am-footer-miscs ">

        <p>&copy;<?php echo date('Y'); ?>版权所有 <?php echo $site['title']; ?></p>
        <p>客服电话：<?php echo $site['telphone']; ?></p>
    </div>
    <div class="fang-footer-bar">
        <ul class="am-avg-sm-4">
            <li><a href="<?php echo url('Index/index'); ?>" <?php if($controller == "index"): ?>class="on"<?php endif; ?>><i class="am-icon-home am-icon-sm"></i><p>首页</p></a></li>
            <li><a href="<?php echo url('Loupan/index'); ?>" <?php if($controller == "loupan"): ?>class="on"<?php endif; ?>><i class="am-icon-building am-icon-sm"></i><p>新房</p></a></li>
            <li><a href="<?php echo url('Second/index'); ?>" <?php if($controller == "second"): ?>class="on"<?php endif; ?>><i class="am-icon-institution am-icon-sm"></i><p>二手</p></a></li>
            <li><a href="<?php echo url('user.index/index'); ?>"><i class="am-icon-user am-icon-sm"></i><p>我的</p></a></li>
        </ul>
    </div>
</footer>
<?php echo $site['mobileJs']; if(isset($ajaxdata)): ?>
<div id="loadingToast" class="am-hide">
    <div class="ylj-mask"></div>
    <div class="ylj-toast">
        <i class="ylj-loading weui-icon_toast"></i>
        <p class="ylj-toast__content">数据加载中</p>
    </div>
</div>
<script src="__PUBLIC__/js/layer/laytpl.js"></script>
<script>
    $(function(){
        $(window).scroll(function(){
            if(($(window).scrollTop() + $(window).height() > $(document).height()-10) && flag){
                var totalpage = $("#lists").data('total');
                if(totalpage > 1 && totalpage >= page){
                    $("#loadingToast").removeClass('am-hide');
                    getData();
                }else{
                    $("#loading-alt").removeClass('am-hide');
                    flag = false;
                }
            }
        });
    });
    function getData(){
        var url =  $("#lists").data('uri');
        $.get(url,params,function(data){
            $("#loadingToast").addClass('am-hide');
            if(data.status == 1){
                if(data.data){
                    var gettpl = document.getElementById('template').innerHTML;
                    laytpl(gettpl).render(data.data, function(html){
                        $('#lists').append(html);
                    });
                }else{
                    $('#lists').html('<li>暂无数据</li>');
                }

            }else{
                $("#loading-alt").removeClass('am-hide');
                flag = false;
            }
        });
        page++;
    }
</script>
<?php endif; ?>
</body>
</html>